function [pointData,intensity] = readbin(fname)
	% readbin Read point and intensity data from Sydney Urban Object binary
	% files.

	% names = ['t','intensity','id',...
	%          'x','y','z',...
	%          'azimuth','range','pid']
	% 
	% formats = ['int64', 'uint8', 'uint8',...
	%            'float32', 'float32', 'float32',...
	%            'float32', 'float32', 'int32']

	fid = fopen(fname, 'r');
	c = onCleanup(@() fclose(fid));

	fseek(fid,10,-1); % Move to the first X point location 10 bytes from beginning
	X = fread(fid,inf,'single',30);
	fseek(fid,14,-1);
	Y = fread(fid,inf,'single',30);
	fseek(fid,18,-1);
	Z = fread(fid,inf,'single',30);

	fseek(fid,8,-1);
	intensity = fread(fid,inf,'uint8',33);

	pointData = [X,Y,Z];
end
